/*
 * NotificationDO.java
 * {Description}
 * Copyright by Axon Active Viet Nam
 * Da Nang
 * All rights reserved.
 */
package com.team.cloudsharing.dao.notification;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.team.cloudsharing.dao.folder.FolderDO;
import com.team.cloudsharing.dao.user.UserDO;

@Entity
@Table(name = "notification")
public class NotificationDO implements Serializable{

	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name = "notification_id")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long notificaitonId;
	
	@Column(name = "content", nullable = false)
	private String content;
	
	@Column(name = "is_read", nullable = false)
	private boolean isRead;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "folder_id", nullable = false)
	private FolderDO folderDO;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "user_id", nullable = false)
	private UserDO userDO;
}
